package com.zhichat.web.dto;

import com.zhichat.infrastructure.valid.AddGroup;
import com.zhichat.infrastructure.valid.ModifyGroup;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class GroupInfoAddOrUpdateDTO implements Serializable {
    /**
     * 群ID
     */
    @NotNull(message = "群ID必须指定", groups = {ModifyGroup.class})
    private Long groupId;
    /**
     * 群名称
     */
    @NotBlank(message = "群名称不能为空", groups = {AddGroup.class, ModifyGroup.class})
    private String groupName;
    /**
     * 入群确认类型
     */
    @NotNull(message = "入群确认类型必须指定", groups = {AddGroup.class})
    private Integer joinType;
    /**
     * 群公告
     */
    private String groupNotice;
    /**
     * 群头像
     */
    @NotNull(message = "群头像不能为空", groups = {AddGroup.class, ModifyGroup.class})
    private MultipartFile groupAvatarFile;
    /**
     * 群封面
     */
    @NotNull(message = "群头像不能为空", groups = {AddGroup.class, ModifyGroup.class})
    private MultipartFile groupAvatarCoverFile;
}
